import request from '@/utils/request'

export function listOperation(data) {
  return request({
    url: '/iam/v1/operations',
    method: 'post',
    data
  })
}

export function createOperation(data) {
  return request({
    url: '/iam/v1/operation',
    method: 'post',
    data
  })
}

export function editOperation(id, data) {
  return request({
    url: '/iam/v1/operation/' + id,
    method: 'put',
    data
  })
}

export function deleteOperation(id) {
  return request({
    url: '/iam/v1/operation/' + id,
    method: 'delete'
  })
}
